import { Injectable } from '@angular/core';
import { Hero } from '../entity/hero';
import { HEROES } from '../mock-data/mock-heros';

@Injectable()
export class HeroService {
  constructor() { }

  //定义函数用来获取mock-heros中的数据
  getHeroes():Promise<Hero[]>{
    return Promise.resolve(HEROES);
  }
}
